<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/pub/includ.jsp"%>
<%
	String c = request.getParameter("c");
%>
<html>
<head>
<title>创建文件夹</title>

<script>
	$(document).ready(function(){
        $.formValidator.initConfig({formid:"newFilePathForm",alertMessage:true,onerror:function(msg){alert(msg)}});
		$("#path").formValidator().inputValidator({min:1,max:30,onerror:"文件夹名称是1-30个小写字母组成！"}).regexValidator({regexp:"^([a-z]*)$",onerror:"文件夹名称是1-30个小写字母组成!"});
    });
    
	function save(){
		if($.formValidator.pageIsValid()){
			if($("#imgFile").val()==""){
				alert("请选择要上传的图片！");
				return "failure";
			}else{
			 	var options = {
					type: 'POST',
					async: false,
					dataType: 'content-type',
					success: function(msg) {
						return msg
					}
				}
				$('#newFilePathForm').ajaxSubmit(options);
				return "success";
			}
		}
	}
</script>
</head>
<body style="margin:0;">
<div class="box">
	<form id="newFilePathForm" name="newFilePathForm" method="post" action="<%=path %>/res/newpath" >
		文件夹名称：<input type="text" name="path" id="path"/>
		<input type="hidden" value="<%=c %>" name="c"/>
	</form>
</div>
</body>
</html>


